3.48 \(\int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx\)

Optimal. Leaf size=54 \[ \frac {d^2 \log (\sin (a+b x))}{b^3}-\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b} \]

[Out]

-d*(d*x+c)*cot(b*x+a)/b^2-1/2*(d*x+c)^2*csc(b*x+a)^2/b+d^2*ln(sin(b*x+a))/b^3

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {4410, 4184, 3475} \[ -\frac {d (c+d x) \cot (a+b x)}{b^2}+\frac {d^2 \log (\sin (a+b x))}{b^3}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)^2*Cot[a + b*x]*Csc[a + b*x]^2,x]

[Out]

-((d*(c + d*x)*Cot[a + b*x])/b^2) - ((c + d*x)^2*Csc[a + b*x]^2)/(2*b) + (d^2*Log[Sin[a + b*x]])/b^3

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 4410

Int[Cot[(a_.) + (b_.)*(x_)]^(p_.)*Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp
[((c + d*x)^m*Csc[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Csc[a + b*x]^n, x], x] /; Fr
eeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rubi steps

\begin {align*} \int (c+d x)^2 \cot (a+b x) \csc ^2(a+b x) \, dx &=-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d \int (c+d x) \csc ^2(a+b x) \, dx}{b}\\ &=-\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d^2 \int \cot (a+b x) \, dx}{b^2}\\ &=-\frac {d (c+d x) \cot (a+b x)}{b^2}-\frac {(c+d x)^2 \csc ^2(a+b x)}{2 b}+\frac {d^2 \log (\sin (a+b x))}{b^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.89, size = 94, normalized size = 1.74 \[ \frac {-b^2 (c+d x)^2 \csc ^2(a+b x)+2 b d \csc (a) \sin (b x) (c+d x) \csc (a+b x)-2 i d^2 \tan ^{-1}(\tan (a+b x))-2 b d^2 x \cot (a)+d^2 \log \left (\sin ^2(a+b x)\right )+2 i b d^2 x}{2 b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)^2*Cot[a + b*x]*Csc[a + b*x]^2,x]

[Out]

((2*I)*b*d^2*x - (2*I)*d^2*ArcTan[Tan[a + b*x]] - 2*b*d^2*x*Cot[a] - b^2*(c + d*x)^2*Csc[a + b*x]^2 + d^2*Log[
Sin[a + b*x]^2] + 2*b*d*(c + d*x)*Csc[a]*Csc[a + b*x]*Sin[b*x])/(2*b^3)

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 102, normalized size = 1.89 \[ \frac {b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} + 2 \, {\left (b d^{2} x + b c d\right )} \cos \left (b x + a\right ) \sin \left (b x + a\right ) + 2 \, {\left (d^{2} \cos \left (b x + a\right )^{2} - d^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (b x + a\right )\right )}{2 \, {\left (b^{3} \cos \left (b x + a\right )^{2} - b^{3}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="fricas")

[Out]

1/2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 + 2*(b*d^2*x + b*c*d)*cos(b*x + a)*sin(b*x + a) + 2*(d^2*cos(b*x + a)
^2 - d^2)*log(1/2*sin(b*x + a)))/(b^3*cos(b*x + a)^2 - b^3)

________________________________________________________________________________________

giac [B]  time = 2.88, size = 3482, normalized size = 64.48 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="giac")

[Out]

-1/8*(b^2*d^2*x^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*c*d*x*tan(1/2*b*x)^4*tan(1/2*a)^4 + 2*b^2*d^2*x^2*tan(1/
2*b*x)^4*tan(1/2*a)^2 + 2*b^2*d^2*x^2*tan(1/2*b*x)^2*tan(1/2*a)^4 + b^2*c^2*tan(1/2*b*x)^4*tan(1/2*a)^4 + 4*b^
2*c*d*x*tan(1/2*b*x)^4*tan(1/2*a)^2 - 4*b*d^2*x*tan(1/2*b*x)^4*tan(1/2*a)^3 + 4*b^2*c*d*x*tan(1/2*b*x)^2*tan(1
/2*a)^4 - 4*b*d^2*x*tan(1/2*b*x)^3*tan(1/2*a)^4 + b^2*d^2*x^2*tan(1/2*b*x)^4 + 4*b^2*d^2*x^2*tan(1/2*b*x)^2*ta
n(1/2*a)^2 + 2*b^2*c^2*tan(1/2*b*x)^4*tan(1/2*a)^2 - 4*b*c*d*tan(1/2*b*x)^4*tan(1/2*a)^3 + b^2*d^2*x^2*tan(1/2
*a)^4 + 2*b^2*c^2*tan(1/2*b*x)^2*tan(1/2*a)^4 - 4*b*c*d*tan(1/2*b*x)^3*tan(1/2*a)^4 + 2*b^2*c*d*x*tan(1/2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 4*b^3*tan(1/2*b*x)^2*tan(1/2*a)^2 - 2*b^3*tan(1/2*b*x)*tan(1/2*a)^3 + b^3*tan(1/2*b*x)^2 + 2*b^3*
tan(1/2*b*x)*tan(1/2*a) + b^3*tan(1/2*a)^2)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 95, normalized size = 1.76 \[ -\frac {d^{2} x^{2}}{2 b \sin \left (b x +a \right )^{2}}-\frac {d^{2} \cot \left (b x +a \right ) x}{b^{2}}+\frac {d^{2} \ln \left (\sin \left (b x +a \right )\right )}{b^{3}}-\frac {c d x}{b \sin \left (b x +a \right )^{2}}-\frac {c d \cot \left (b x +a \right )}{b^{2}}-\frac {c^{2}}{2 b \sin \left (b x +a \right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x)

[Out]

-1/2/b*d^2/sin(b*x+a)^2*x^2-1/b^2*d^2*cot(b*x+a)*x+d^2*ln(sin(b*x+a))/b^3-1/b*c*d/sin(b*x+a)^2*x-1/b^2*c*d*cot
(b*x+a)-1/2/b*c^2/sin(b*x+a)^2

________________________________________________________________________________________

maxima [B]  time = 0.36, size = 1130, normalized size = 20.93 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)^2*cos(b*x+a)*csc(b*x+a)^3,x, algorithm="maxima")

[Out]

1/2*(4*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x + a)*cos(2*b*x + 2*a) + sin(
2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*b*x + 2*a) - cos(2*b*x + 2*
a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*c*d/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4
*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2
 + 4*cos(2*b*x + 2*a) - 1)*b) - 4*(4*(b*x + a)*cos(2*b*x + 2*a)^2 + 4*(b*x + a)*sin(2*b*x + 2*a)^2 - (2*(b*x +
 a)*cos(2*b*x + 2*a) + sin(2*b*x + 2*a))*cos(4*b*x + 4*a) - 2*(b*x + a)*cos(2*b*x + 2*a) - (2*(b*x + a)*sin(2*
b*x + 2*a) - cos(2*b*x + 2*a) + 1)*sin(4*b*x + 4*a) + sin(2*b*x + 2*a))*a*d^2/((2*(2*cos(2*b*x + 2*a) - 1)*cos
(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x
+ 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*b^2) + (8*(b*x + a)^2*cos(2*b*x + 2*a)^2 + 8*(b*x + a)
^2*sin(2*b*x + 2*a)^2 - 4*(b*x + a)^2*cos(2*b*x + 2*a) - 4*((b*x + a)^2*cos(2*b*x + 2*a) + (b*x + a)*sin(2*b*x
 + 2*a))*cos(4*b*x + 4*a) + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x +
2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a)
- 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) + (2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a)
- cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x + 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin
(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) - 4*((b*x
+ a)^2*sin(2*b*x + 2*a) + b*x - (b*x + a)*cos(2*b*x + 2*a) + a)*sin(4*b*x + 4*a) + 4*(b*x + a)*sin(2*b*x + 2*a
))*d^2/((2*(2*cos(2*b*x + 2*a) - 1)*cos(4*b*x + 4*a) - cos(4*b*x + 4*a)^2 - 4*cos(2*b*x + 2*a)^2 - sin(4*b*x +
 4*a)^2 + 4*sin(4*b*x + 4*a)*sin(2*b*x + 2*a) - 4*sin(2*b*x + 2*a)^2 + 4*cos(2*b*x + 2*a) - 1)*b^2) - c^2/sin(
b*x + a)^2 + 2*a*c*d/(b*sin(b*x + a)^2) - a^2*d^2/(b^2*sin(b*x + a)^2))/b

________________________________________________________________________________________

mupad [B]  time = 2.56, size = 147, normalized size = 2.72 \[ \frac {\frac {{\left (c+d\,x\right )}^2}{b}+\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,{\left (c+d\,x\right )}^2}{b}}{1+{\mathrm {e}}^{a\,4{}\mathrm {i}+b\,x\,4{}\mathrm {i}}-2\,{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}}-\frac {d^2\,x\,2{}\mathrm {i}}{b^2}+\frac {b\,c^2+2\,b\,c\,d\,x-c\,d\,2{}\mathrm {i}+b\,d^2\,x^2-d^2\,x\,2{}\mathrm {i}}{b^2\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}-1\right )}+\frac {d^2\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}-1\right )}{b^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(a + b*x)*(c + d*x)^2)/sin(a + b*x)^3,x)

[Out]

((c + d*x)^2/b + (exp(a*2i + b*x*2i)*(c + d*x)^2)/b)/(exp(a*4i + b*x*4i) - 2*exp(a*2i + b*x*2i) + 1) - (d^2*x*
2i)/b^2 + (b*c^2 - c*d*2i - d^2*x*2i + b*d^2*x^2 + 2*b*c*d*x)/(b^2*(exp(a*2i + b*x*2i) - 1)) + (d^2*log(exp(a*
2i)*exp(b*x*2i) - 1))/b^3

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (c + d x\right )^{2} \cos {\left (a + b x \right )} \csc ^{3}{\left (a + b x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)**2*cos(b*x+a)*csc(b*x+a)**3,x)

[Out]

Integral((c + d*x)**2*cos(a + b*x)*csc(a + b*x)**3, x)

________________________________________________________________________________________